﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

using AAEngine.Engine.Core;

namespace AAEngine.Animation
{
    public class AnimationEvent : Event
    {
        private Animator _animation;

        /// <summary>
        /// This event is dispatched by an Animator when the animation completely finishes.
        /// </summary>
        public static readonly string ANIMATION_FINISHED_EVENT = "AAEngine.Animation.AnimationEvent.ANIMATION_FINISHED_EVENT";

        /// <summary>
        /// This event is dispatched by an Animator when the animation has finished one iteration
        /// and is repeating.
        /// </summary>
        public static readonly string ANIMATION_REPEATED_EVENT = "AAEngine.Animation.AnimationEvent.ANIMATION_REPEATED_EVENT";

        /// <summary>
        /// This event is dispatched by an Animator when the animation is resumed after being manually
        /// stopped.
        /// </summary>
        public static readonly string ANIMATION_RESUMED_EVENT = "AAEngine.Animation.AnimationEvent.ANIMATION_RESUMED_EVENT";

        /// <summary>
        /// This event is dispatched by an Animator when the animation first starts.
        /// </summary>
        public static readonly string ANIMATION_STARTED_EVENT = "AAEngine.Animation.AnimationEvent.ANIMATION_STARTED_EVENT";

        /// <summary>
        /// This event is dispatched by an Animator when the animation is manually stopped.
        /// </summary>
        public static readonly string ANIMATION_STOPPED_EVENT = "AAEngine.Animation.AnimationEvent.ANIMATION_STOPPED_EVENT";

        public AnimationEvent(string type, Animator animation)
            : base(type)
        {
            _animation = animation;
        }

        public Animator Animation
        {
            get { return _animation; }
            set { _animation = value; }
        }
    }
}
